import React from 'react';
import {BrowserRouter, Routes, Route,} from 'react-router-dom';        //导入路由的库元素组件

// 导入项目中的页面文件以配置路由
import BlogIndex from "../../modules/blog/index/BlogIndex";
import ArticleEditor from "../../modules/blog/articleditor/ArticleEditor";
import ArticleLists from "../../modules/blog/articlelists/ArticleLists";
import ArticleBody from "../../modules/blog/articlebody/ArticleBody";

function RouterView() {
    return (
        <BrowserRouter>
            <Routes>
                <Route path="/" element={<BlogIndex />}>
                    <Route path="list" element={<ArticleLists />} />
                    <Route path="body" element={<ArticleBody />} />
                </Route>
                <Route path="/editor" element={<ArticleEditor />} />
            </Routes>
        </BrowserRouter>
    );
}



export default RouterView;
